package com.matt.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.matt.commons.model.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 育儿百科--点赞信息
 */
@Entity
@Data
@Table(name = "parenting_encyclopedia_likes")
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class ParentingEncyclopediaLikes extends Model {

    @Column(columnDefinition = " varchar(32) COMMENT '育儿百科id'")
    private String parentEncyclopedId;

    @Column(columnDefinition = " varchar(32)  COMMENT '评论人id'")
    private String userId;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone="GMT+8")
    @Column(columnDefinition = " datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'")
    private Date createTime;

    @Column(columnDefinition = " int DEFAULT 0  COMMENT '是否删除   0:未删除  1:已删除'")
    private Integer deleted;


}
